package com.alex.blog.controller;


import com.alex.blog.entity.User;
import com.alex.blog.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author alexzshl
 * @since 2021-03-04
 */
@RestController
@RequestMapping("/blog/user")
public class UserController {

    @Autowired
    UserService userService;

    @GetMapping("test")
    public User test01() {
        User user = userService.getById(2);
        return user;
    }
}

